package first.group.ssh.packet.reader;

import first.group.ssh.packet.PacketParser;
import java.nio.ByteBuffer;

public class BooleanReader {
    public static Boolean readBoolean(ByteBuffer buffer) {
        if (!PacketParser.bufferRemains(buffer, 1)) {
            return null;
        }
        var data = buffer.get();
        return data != 0;
    }
}
